/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */

/* 
 * Hum -- The Low Calorie Music Manager
 * 
 * Copyright (C) 2007 by Brian Davis <brian.william.davis@gmail.com>
 *
 * This file is modifiable/redistributable under the terms of the GNU
 * General Public License.
 *
 * You should have recieved a copy of the GNU General Public License along
 * with this program; see the file COPYING. If not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 0211-1307, USA.
 */

#ifndef _HUM_UI_H
#define _HUM_UI_H

#include "hum_utils.h"

enum
{
	HUM_COL_URI,
	HUM_COL_STATUS,
	HUM_COL_TITLE,
	HUM_COL_ARTIST,
	HUM_COL_ALBUM,
	HUM_COL_TRACK_NO,
	HUM_COL_GENRE,
	HUM_COL_DURATION,
	HUM_COL_N_COLS
};

void hum_init_ui ();
void hum_init_view ();
void hum_init_store ();
void hum_show_about_dialog ();
void hum_hide_about_dialog (GtkWidget *about);
void hum_populate_store_async (GPtrArray *result, GError *error, gpointer data);
void hum_populate_row (gchar *uri);
// FIXME: 'hum_populate_row' should have the following declaration:
// void hum_populate_row (GSList *columns);
// where 'columns' is a list populated with column values corresponding to the
// enum above. 
void hum_update_stats ();
void hum_reset_ui ();
void hum_destroy_ui ();

gint hum_title_sort (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer data);
gint hum_artist_sort (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer data);
gint hum_album_sort (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer data);
gint hum_track_sort (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer data);
gint hum_genre_sort (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer data);
gint hum_duration_sort (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer data);

void hum_play_button_toggled (GtkWidget *b, gpointer data);
void hum_stop_button_clicked (GtkWidget *b, gpointer data);
void hum_next_button_clicked (GtkWidget *b, gpointer data);
void hum_prev_button_clicked (GtkWidget *b, gpointer data);
void hum_search_activated (GtkWidget *b, gpointer data);

void hum_song_selected (GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer data);
gboolean hum_slider_moved (GtkRange *range, GtkScrollType scroll, gdouble value, gpointer data);

#endif /* _HUM_UI_H */
